
from gevent import monkey; monkey.patch_all()
import gevent
import time

def eat():
    print('eating start')
    # gevent.sleep(1)
    time.sleep(1)
    print('eating end')


def play():
    print('playing start')
    # gevent.sleep(1)
    time.sleep(1)
    print('playing end')


g1 = gevent.spawn(eat)
g2 = gevent.spawn(play)

gevent.joinall([g1, g2])
